<script type="text/javascript">
<!--
jQuery(document).ready(function($){
	// fancybox plugin
	$("a.fancybox").attr('rel', 'gallery').fancybox({
		});	 
	
	// custom checkboxes
	//$('.kcheck input[type=checkbox]').checkbox(); 
	
	// preload images
	//$.preload('#Kload img', {placeholder:'{STYLE_PATH_ADMIN}images/ajax-loader.gif',notFound:'{STYLE_PATH_ADMIN}js/fancybox/failerror.jpg',	enforceCache: true,	threshold: 2 });

	$("img.mask").hover(function(){$(this).stop().animate({'opacity': '0'}, 'fast');},function() {$(this).stop().animate({'opacity': '1'}, 'fast');});
			
	$('.tip').tipsy({
		title: function() { return $(this).children('.ktip').html() },
		html: true,
		gravity: $.fn.tipsy.autoNS
	   });

	//Navigate to pages by arrows
	$(document).keydown(function(e) {
		if (!$('#pagination').length) {
			return;
		}
		var current_page = parseInt($('#pagination .current span').html());
		var is_there_next = $('#pagination .phover').length < 2 && current_page > 1 ? false : true;
		var current_location = '{action}'.replace(/[&]*page=[0-9]+/i, '').replace(/&&/, '');
		switch(e.keyCode) { 
			//left, next
			case 37:
				if(!is_there_next){
					return;
				}
				get_kleeja_link(current_location + '&page=' + (current_page+1), '#content');
			break;
			//right, prev
			case 39:
				if(current_page <= 1){
					return;
				}
				get_kleeja_link(current_location + '&page=' + (current_page-1), '#content');
			break;
		}
	});

});
//-->
</script>



<h1>{lang.R_IMG_CTRL}  [{current_page}/{total_pages}]</h1>

<div class="br"></div>
<IF NAME="config.thumbs_imgs"><ELSE>
<div class="note-info">
{lang.THUMB_DIS_LONGTIME}
</div>
<div class="br"></div>
</IF>

<form method="post" name="imgform" action="{action}" id="imgs_form">
	
<IF NAME="no_results">
	<h2>{lang.NOTHING}</h2>
<ELSE>


<!-- start data div -->
<div id="boxs">
<div class="xthumbs">
	<LOOP NAME="arr">
	{{tdnum}}
	<li id="su[{{id}}]" class="tip">
		<a href="{{href}}" class="fancybox">
			<div id="Kload"><img src="{{thumb_link}}" alt=""  /></div>
			<img class="mask" src="{STYLE_PATH_ADMIN}js/fancybox/k_mask.png" alt="" />
			<img class="expand" src="{STYLE_PATH_ADMIN}js/fancybox/k_mask_hover.png" alt="" />
		</a>
		<ul class='ktip' style="display: none;">
			<ul>
			<li><span>{lang.FILENAME} :</span>{{name}}</li>
			<li><span>{lang.FILEUPS} :</span> {{ups}}</li>
			<li><span>{lang.FILESIZE} :</span> {{size}}</li>
			<li><span>{lang.FILEDATE} :</span> {{time}}</li>
			<li><span>{lang.BY} :</span> {{user}}</li>
			<li><span>{lang.IP} :</span> {{ip}}</li>
			</ul>
		</ul>
		<p class="kcheck"><input name="del_{{id}}" type="checkbox" value="{{id}}" onclick="change_color(this,'su[{{id}}]', 'kfocus');" rel="_del" /></p>
	</li>
	{{tdnum2}}
	</LOOP>
</div>
</div>
<!-- end data div -->

<div class="br"></div>

<div class="left check_all">[ <a href="javascript:void(0);" onclick="checkAll(document.imgform, '_del', 'su', 'kfocus');">{lang.CHECK_ALL}</a> ]</div>
	
<!-- pagination -->
{page_nums}

<div class="br"></div>

<!-- button -->
<p>
	<input type="hidden" name="submit" value="1" />
	<button type="submit" name="submit" class="btn" onclick="javascript:submit_kleeja_data('#imgs_form', '#content', 1); return false;"><span>{lang.DEL_SELECTED}</span></button>
</p>

</IF>
	
{H_FORM_KEYS}
</form>

<!-- do you know ? 

	<h3>Keyboards Keys /</h3>
	->	: {lang.NEXT} <br />
	<-	: {lang.PREV} <br />
-->
